#define _CRT_SECURE_NO_WARNINGS 1
#include"BinaryTree.h"
int main() {
	BTNode* A = (BTNode*)malloc(sizeof(BTNode));
	A->left = A->right = NULL;
	A->val = 'A';

	BTNode* B = (BTNode*)malloc(sizeof(BTNode));
	B->left = B->right = NULL;
	B->val = 'B';

	BTNode* C = (BTNode*)malloc(sizeof(BTNode));
	C->left = C->right = NULL;
	C->val = 'C';

	BTNode* D = (BTNode*)malloc(sizeof(BTNode));
	D->left = D->right = NULL;
	D->val = 'D';

	BTNode* E = (BTNode*)malloc(sizeof(BTNode));
	E->left = E->right = NULL;
	E->val = 'E';

	A->left = B;
	A->right = C;
	B->left = D;
	B->right = E;

	prevOrder(A);
	printf("\n");
	InOrder(A);
	printf("\n");
	PostOrder(A);
	printf("\n");
	int Asize=0;
	printf("%d\n", TreeSize(A,&Asize));
	int Bsize = 0;
	printf("%d\n", TreeSize(B,&Bsize));
	printf("%d\n", TreeSize1(A));
	printf("%d\n", TreeLeaSize(A));
	printf("%d\n", TreeLeaSize(B));
	printf("%d\n", TreeLeaSize(C));
	printf("%d\n", TreeLeaSize(D));
	printf("%d\n", TreeLeaSize(E));
	return 0;
}